import JSEncrypt from 'jsencrypt'

export default class RsaService {
  rsaEncrypt(pwd: any) {
    const jse = new JSEncrypt()
    jse.setPublicKey('MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAhbA87Fr0l3fS1VFLCuusCDx4xXt5Uooh+5lZmqjHXnChGk89p2g/PoAwLpafYvQfPZAal3aOJrvPcS1ejdBKePK54LqIpVhN7ejvndp3zCgcrpx3u3tGU4Iza9qVJrHTFJ3HxOKxhturH1VbpZV9bpyZyaQe0d9PIKeYy5osEhWcqxRyarz/3NnwojokMgA3ObBa+aotlOyg4w7tt9a7KO7hWq0gqM3A2WMM1BBxieKP/qAO6bjUJn+s6sjyUdWZ0eDK5VX8XL0jHfreMbYyak/LoW+MPuB8vsQGLHpsZQ1EDLbXbSNMso4tN/dHFdFOjfQJ88F7nG2nftW/HyX0p8D5WKBjF0iafqiq55IJdBC8GpWrybik+esiavDFcQFrvhUweygCjfpBCoxpHZcGoJb+We69q9/i0Zo6dzeRkpJADKnHlaBuwq80QD5Lw0B23LPiJ/Pq0QeVm8JPXrG+Sp2npHq0prTkssjoRWyt9xqfKAPuuxYrqTyM6vo0ZyCBAgMBAAE=')
    const encrypted = jse.encrypt(pwd)
    return encrypted
  }
}
